home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / misc-part1 / 49 < prev    next >
Encoding:
Text File  |  1996-08-05  |  2.0 KB  |  82 lines

  1. Path: coos.dartmouth.edu!rloisel
  2. From: rloisel@coos.dartmouth.edu (Rodney E. Loisel)
  3. Newsgroups: algonet.amiga,swnet.sys.amiga,comp.sys.amiga.misc
  4. Subject: Re: ARexx Help Wanted
  5. Date: 2 Jan 1996 03:44:50 GMT
  6. Organization: Dartmouth College, Hanover, NH, USA
  7. Message-ID: <4ca9ni$m15@dartvax.dartmouth.edu>
  8. References: <1593.6573T639T495@algonet.se>
  9. NNTP-Posting-Host: coos.dartmouth.edu
  10.  
  11. hansmbg@algonet.se (Hans Malmberg) writes:
  12.  
  13. >** my current output is included.
  14. >*/
  15.  
  16. >/* write.rexx  */
  17. >/* string.index test */
  18. >/* */
  19. ptions prompt "entry: "
  20.  
  21. i=1   /* changed this for consistency  */
  22.       /* with your string() subprogram */
  23. cnt = 1
  24.  
  25. str = ""
  26. do while i < 4  /* and changed this to <4 */
  27.    PARSE PULL instring
  28.    call write
  29.    i = i + 1
  30. end
  31.  
  32. /* here's my problem..  */1
  33. /* the strinsg are not printed   */
  34.  
  35. i = 1              /* same here */
  36.    do while i < 4  /* same here */
  37.    say 'str.' || i || '  ' || str.i
  38.    i = i + 1
  39. end
  40.  
  41. exit
  42.  
  43. write: PROCEDURE EXPOSE instring str. cnt
  44.                            /*    ^^^^                 */
  45.                            /*    ||||   added dot'.'  */
  46.    say 'instring : ' || instring
  47.    str.cnt = instring
  48. say 'cnt ' || cnt
  49. say 'str.cnt ' || cnt || '  ' || str.cnt
  50.  cnt = cnt + 1
  51. return
  52.  
  53. Here's my output:
  54. 3.DH3:TELCOM/term>rx write       
  55. entry: Hello          
  56. instring : Hello
  57. cnt 1
  58. str.cnt 1  Hello
  59. entry: How are you ?  
  60. instring : How are you ?
  61. cnt 2
  62. str.cnt 2  How are you ?
  63. entry: Happy New Year
  64. instring : Happy New Year
  65. cnt 3
  66. str.cnt 3  Happy New Year
  67. str.1  Hello
  68. str.2  How are you ?
  69. str.3  Happy New Year
  70.  
  71.  
  72. A1000 since 1986
  73. rloisel@coos.dartmouth.edu (Rodney.E.Loisel)
  74.                                *                        *      *
  75.          ____*              *                  *
  76.       __/    \____________________________________________________    *
  77. ++*++/   "I have seen the Starships off the shoulder of Orion" \__\____   
  78. ++*++\__      ____________________________________________________/ *
  79.         \____/       *           *                 *
  80.      *         *  *                  *                       *          *
  81.  
  82.